﻿using System.Collections.Generic;
using Newtonsoft.Json;

namespace T.FAS.Runtime.Metadata.Entity.MF
{
    public class IterationNode : NodeBase
    {
        [JsonProperty("data")]
        public new IterationNodeData Data { get; set; }
        [JsonProperty("children")]
        public new List<string> Children { get; set; }
    }

    public class IterationNodeData
    {
        [JsonProperty("description")]
        public string Description { get; set; }

        [JsonProperty("label")]
        public string Label { get; set; }
        [JsonProperty("isParallel")]

        public bool IsParallel { get; set; }
        [JsonProperty("parallelNums")]

        public int ParallelNums { get; set; }
        [JsonProperty("status")]
        public string Status { get; set; }
        [JsonProperty("inputFields")]
        public List<UserVariable> InputVariables { get; set; }

        [JsonProperty("outputFields")]
        public List<IterationOutputField> OutputVariables { get; set; }
    }

    public class IterationOutputField
    {
        [JsonProperty("variableId")]
        public string VariableId { get; set; }
        [JsonProperty("nodeId")]
        public string NodeId { get; set; }
        [JsonProperty("variable")]
        public string Variable { get; set; }
        [JsonProperty("type")]
        public string Type { get; set; }
        [JsonProperty("valueType")]
        public string ValueType { get; set; }
        [JsonProperty("variableNodeId")]
        public string VariableNodeId { get; set; }
        [JsonProperty("variableValue")]
        public string VariableValue { get; set; }
        [JsonProperty("variableType")]
        public string VariableType { get; set; }
    }
}
